package com.hutao.manage.query;

import java.util.Comparator;

public class PrintPageDTO implements Comparator{
	
	private String fileType;
	private String fileName;
	private String fileUrl;
	private String fileHash;
	private Integer mrPageTypeId;
	private String markPicUrl;
	private String originalFileName;
	public String getFileType() {
		return fileType;
	}
	public void setFileType(String fileType) {
		this.fileType = fileType;
	}
	public String getFileName() {
		return fileName;
	}
	public void setFileName(String fileName) {
		this.fileName = fileName;
	}
	public String getFileUrl() {
		return fileUrl;
	}
	public void setFileUrl(String fileUrl) {
		this.fileUrl = fileUrl;
	}
	public String getFileHash() {
		return fileHash;
	}
	public void setFileHash(String fileHash) {
		this.fileHash = fileHash;
	}
	public Integer getMrPageTypeId() {
		return mrPageTypeId;
	}
	public void setMrPageTypeId(Integer mrPageTypeId) {
		this.mrPageTypeId = mrPageTypeId;
	}
	public String getMarkPicUrl() {
		return markPicUrl;
	}
	public void setMarkPicUrl(String markPicUrl) {
		this.markPicUrl = markPicUrl;
	}
	
	
	public String getOriginalFileName() {
		return originalFileName;
	}
	public void setOriginalFileName(String originalFileName) {
		this.originalFileName = originalFileName;
	}
	@Override
	public int compare(Object o1, Object o2) {
		PrintPageDTO dto1=(PrintPageDTO) o1;
		PrintPageDTO dto2=(PrintPageDTO) o2;
		
		if(dto1.getMrPageTypeId() .equals( dto2.getMrPageTypeId())) {
			if(dto1.getOriginalFileName()!=null && dto2.getOriginalFileName()!=null) {
				return dto1.getOriginalFileName().compareTo(dto2.getOriginalFileName());
			}
		}
			
			return dto1.getMrPageTypeId().compareTo(dto2.getMrPageTypeId());
		
		
	}
	
	
		

}
